import request from "../utils/request";
import {DeptListParams,DeptParams} from "@/interface/dept"

// 获取全部部门列表数据
export function deptList(data?:DeptListParams):any {
    return request({
      type:'get',
      url:"/dept/list",
      data
    })
  }

// 创建部门
export function deptCreate(data:DeptParams):any  {
  return request({
    type:'post',
    url:"/dept/create",
    data
  })
}

// 编辑部门
export function deptEdit(data:DeptParams):any  {
  return request({
    type:'post',
    url:"/dept/edit",
    data
  })
}

// 删除部门
export function deptDelete(id:number):any  {
  return request({
    type:'get',
    url:"/dept/delete",
    data:{id}
  })
}